using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class MentalObjectManager : MonoBehaviour {
	
	//The characters in the scene
	Character[] characters;
	
	// Use this for initialization
	void Start () {
		characters = gameObject.GetComponentsInChildren<Character>();
		
		//Tell every character about all the other characters
		for (int i = 0; i < characters.Length; i++) {
			for (int j = i+1; j < characters.Length; j++) {
				characters[i].addMentalCharacter(characters[j]);
				characters[j].addMentalCharacter (characters[i]);
			}
		}
	}
	
	//Add the item to each character's mental items list
	public void addItem(ItemScript item) {
		for(int i = 0; i < characters.Length; i++) {
			characters[i].addMentalItem(item);
		}
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
